<template>
  <div id="detail-goods-info">
    <div class="title">{{ goods_info.title }}</div>
    <div class="price">
      <span class="price-now">{{ '￥' + goods_info.price_now }}</span>
      <span class="price-old">{{ '￥' + goods_info.price_old }}</span>
      <span
        v-for="(item, index) in goods_info.price_tags"
        :key="index"
        class="price-tips"
        >{{ item.text }}</span
      >
    </div>
    <div class="other">
      <span
        v-for="(item, index) in goods_info.goods_columns"
        :key="index"
        class="price-tips"
        >{{ item.desc }}</span
      >
    </div>
    <div class="serve-info">
      <div v-for="(item, index) in goods_info.goods_services" :key="index">
        <img v-lazy="item.icon" alt="" />
        <span>{{ item.name }}</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    goods_info: {
      type: Object,
      default() {
        return {}
      },
    },
  },
}
</script>

<style lang="less" scoped>
#detail-goods-info {
  padding: 10px 10px 0 10px;
  border-bottom: 5px solid #eeeeee;
  .title {
    font-size: 18px;
  }

  .price {
    height: 44px;
    display: flex;
    align-items: center;
    span {
      margin-right: 5px;
    }
    .price-now {
      font-size: 18px;
      font-weight: bold;
      color: @base-color;
    }

    .price-old {
      font-size: 12px;
      color: #999999;
    }

    .price-tips {
      background-color: @base-color;
      font-size: 12px;
      color: #ffffff;
      padding: 5px;
      border-radius: 15px;
    }
  }

  .other {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 20px;
    span {
      color: #999999;
      font-size: 12px;
    }
  }

  .serve-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;

    div {
      font-size: 14px;
      display: flex;
      align-items: center;

      img {
        width: 14px;
        margin-right: 3px;
      }
    }
  }
}
</style>
